<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SWF::TextField - SWF TextField class</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:feedback@suse.de" />
</head>

<body style="background-color: white">


<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
	<li><a href="#notes_">NOTES:</a></li>
	<li><a href="#methods">METHODS</a></li>
	<li><a href="#author">AUTHOR</a></li>
	<li><a href="#see_also">SEE ALSO</a></li>
</ul>

<hr name="index" />
</div>
<!-- INDEX END -->

<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>SWF::TextField - SWF TextField class</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
        use SWF::TextField;
        $textfield = new SWF::TextField([$flags]);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>Unlike SWF::Text objects, TextFields cannot be rotated, scaled non-proportionally, or skewed. However, TextFields can be used as form entries and they can use browser-defined fonts.</p>
<p>
</p>
<hr />
<h1><a name="notes_">NOTES:</a></h1>
<pre>
    TextField is implemented into Flash since Flash3. 
    Most of features for TextFields are available since Flash4.
    Simple HTML-tags in TextField are possible since Flash5.</pre>
<p>
</p>
<hr />
<h1><a name="methods">METHODS</a></h1>
<dl>
<dt><strong><a name="textfield" class="item">new SWF::TextField([$flags]);</a></strong>

<dd>
<p>Creates a TextField object whose behaviour is dictated by <code>flags</code> (see also SWF::Constants):</p>
</dd>
<dd>
<pre>
  SWFTEXTFIELD_NOEDIT:        Non-editable Textfiled
  SWFTEXTFIELD_PASSWORD:      Obscure user input with astricts.
  SWFTEXTFIELD_DRAWBOX:       Draw a border around TextField
  SWFTEXTFIELD_MULTILINE:     TextFiels may contain multiple lines
  SWFTEXTFIELD_WORDWRAP:      Warp text when text reaches TextField border
  SWFTEXTFIELD_NOSELECT:      TextField is not selected when user clicks on it
  SWFTEXTFIELD_ALIGN_LEFT:    Align text to the left
  SWFTEXTFIELD_ALIGN_RIGHT:   Align text to the right
  SWFTEXTFIELD_ALIGN_CENTER:  Align text to the center
  SWFTEXTFIELD_ALIGN_JUSTIFY: Justify text
  SWFTEXTFIELD_HTML:          Add HTML markup string
  SWFTEXTFIELD_HASLENGTH:     
  SWFTEXTFIELD_USEFONT:       Want to embed font
  SWFTEXTFIELD_AUTOSIZE:</pre>
</dd>
<dd>
<p>Flags may be combined with the bitwise OR operation. For example:</p>
</dd>
<dd>
<pre>
    my $t = new SWF::TextField(SWFTEXTFIELD_MULTILINE | SWFTEXTFIELD_WORDWRAP);</pre>
</dd>
</li>
<dt><strong><a name="addstring" class="item">$textfield-&gt;<code>addString($string)</code></a></strong>

<dt><strong><a name="addutf8string" class="item">$textfield-&gt;addUTF8String($UTF8string)</a></strong>

<dd>
<p>Add $string to TextField. Text is appended to the existing text.</p>
</dd>
</li>
<dt><strong><a name="align" class="item">$textfield-&gt;<code>align($alignment)</code></a></strong>

<dt><strong><a name="setalignment" class="item">$textfield-&gt;<code>setAlignment($alignment)</code></a></strong>

<dd>
<p>Set the alignment of the text in the textfield. Possible values are</p>
</dd>
<dd>
<pre>
        SWFTEXTFIELD_ALIGN_LEFT
        SWFTEXTFIELD_ALIGN_RIGHT
        SWFTEXTFIELD_ALIGN_CENTER
        SWFTEXTFIELD_ALIGN_JUSTIFY</pre>
</dd>
<dd>
<p>By default a SWF::TextField ist left aligned.</p>
</dd>
</li>
<dt><strong><a name="setbounds" class="item">$textfield-&gt;setBounds($width, $height)</a></strong>

<dd>
<p>Sets the width and height of the textfield.</p>
</dd>
</li>
<dt><strong><a name="setcolor" class="item">$textfield-&gt;setColor($red, $green, $blue [, $alpha])</a></strong>

<dd>
<p>Set the color of the text. An 8 bit value for each parameter. You can use 
the hex or decimal notation. Even mixed.</p>
</dd>
<dd>
<pre>
        $tf-&gt;setColor(0xcc,0,0x33);
        $tf-&gt;setColor(204,0,51,255);</pre>
</dd>
</li>
<dt><strong><a name="setfont" class="item">$textfield-&gt;<code>setFont($font)</code></a></strong>

<dd>
<p>Sets an SWF::Font object -$font- to be used in the TextField.</p>
</dd>
</li>
<dt><strong><a name="setpadding" class="item">$textfield-&gt;<code>setPadding($padding)</code></a></strong>

<dd>
<p>Set TextField padding.</p>
</dd>
</li>
<dt><strong><a name="setheight" class="item">$textfield-&gt;<code>setHeight($height)</code></a></strong>

<dd>
<p>Set the height of font in your textfield.</p>
</dd>
</li>
<dt><strong><a name="setindentation" class="item">$textfield-&gt;<code>setIndentation($indentation)</code></a></strong>

<dd>
<p>Set the indentation of the first line of a paragraph.</p>
</dd>
</li>
<dt><strong><a name="setleftmargin" class="item">$textfield-&gt;<code>setLeftMargin($left)</code></a></strong>

<dd>
<p>Sets the left margin of the textfield.</p>
</dd>
</li>
<dt><strong><a name="setrightmargin" class="item">$textfield-&gt;<code>setRightMargin($right)</code></a></strong>

<dd>
<p>Sets the right margin of the textfield.</p>
</dd>
</li>
<dt><strong><a name="setmargins" class="item">$textfield-&gt;setMargins($left, $right)</a></strong>

<dd>
<p>Sets left and right margins of $textfield.</p>
</dd>
</li>
<dt><strong><a name="setlinespacing" class="item">$textfield-&gt;<code>setLineSpacing($linespacing)</code></a></strong>

<dd>
<p>Sets the space between lines.</p>
</dd>
</li>
<dt><strong><a name="setname" class="item">$textfield-&gt;<code>setName($name)</code></a></strong>

<dt><strong><a name="setvariablename" class="item">$textfield-&gt;<code>setVariableName($name)</code></a></strong>

<dd>
<p>Assigns a name to the TextField which could be used to reference the TextField within ActionScript.</p>
</dd>
</li>
<dt><strong><a name="addchars" class="item">$textfield-&gt;<code>addChars($string)</code></a></strong>

<dt><strong><a name="addutf8chars" class="item">$textfield-&gt;addUTF8Chars($UTF8string)</a></strong>

<dd>
<p>Adds characters to a font that will be available within a textfield.</p>
</dd>
</li>
<dt><strong><a name="setflags" class="item">$textfield-&gt;<code>setFlags($flags)</code></a></strong>

<dd>
<p>Set TextField behaviour by <code>flags</code> (see above new SWF::TextField) For example:</p>
</dd>
<dd>
<pre>
        $textfield-&gt;setFlags(SWFTEXTFIELD_PASSWORD);</pre>
</dd>
</li>
<dt><strong><a name="setlength" class="item">$textfield-&gt;<code>setLength($length)</code></a></strong>

<dd>
<p>Sets limit for user input size to $length.</p>
</dd>
</li>
<dt><strong><a name="setfieldheight" class="item">$textfield-&gt;<code>setFieldHeight($height)</code></a></strong>

<dd>
<p>Sets height limit for visible part of text field. If $height is set to 0, the height is calculated by used font, see <em>setHeight()</em> method.</p>
</dd>
</li>
</dl>
<p>
</p>
<hr />
<h1><a name="author">AUTHOR</a></h1>
<p>Soheil Seyfaie (soheil at users.sourceforge.net).</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p>SWF, SWF::Action, SWF::Button, SWF::Constants, SWF::DisplayItem, SWF::Font, SWF::Movie, SWF::MovieCip, SWF::Text</p>

</body>

</html>
